<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/4/10
  Time: 16:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title>查询教师</title>
</head>
<body>
    <form>
        <table border="1">
            <tr>
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>学科</th>
                <th>操作</th>
            </tr>
            <c:if test="${not empty tear}">
                <c:forEach items="${tear}" var="tear">
                    <tr>
                        <td>${tear.thname}</td>
                        <td>${tear.age}</td>
                        <td>${tear.sex == 1 ? '男':'女'}</td>
                        <td>${tear.bookname}</td>
                        <td><button type="button" onclick="javascript:location.href='delteacher?thname=${tear.thname}'" >删除</button></td>
                    </tr>
                </c:forEach>
            </c:if>
        </table>
    </form>
    <button onclick="javascript:location.href='addteacher.jsp'">返回主页</button>
</body>
</html>
